<?php

/*
  [GRIRMS] (C) 2010 Grandison & JM Technologies

  @author kevin<hasson.lai@mobile-grandison.com>
  @version $Id: index.php 7956 2010-12-20 06:26:31Z kevin $
 */


require_once 'include/common.inc.php';
/*
  === 参数约定 ===
  $m module 模块
  $p page 页面
 */

$m = trim($m) ? trim($m) : 'index';
$p = trim($p) ? trim($p) : 'index';

$module_dir = "module/$m";

checkPermission($m, $p);

//载入模块
$file = APP_ROOT . "./module/$m/$p.php";

if (file_exists($file)) {
    //$m != 'admin' &&  require_once './module/include/header.inc.php';
    require_once $file;
} else {
    exit("错误的模块或者页面！");
    showmessage("错误的模块或者页面！");
}

$mtime = explode(' ', microtime());
$exectime = $mtime[1] + $mtime[0] - $starttime;
include template("$m/html/$p.html", 'module');
?>
